import { defineStore } from 'pinia'

export const useIndexStore = defineStore('index', {
  state: () => ({
    count: 0,
    title: '首页'
  }),
  
  actions: {
    increment() {
      this.count++
    },
    setTitle(newTitle: string) {
      this.title = newTitle
    }
  },
  
  getters: {
    doubleCount(): number {
      return this.count * 2
    }
  }
}) 